/*---------------------------------------------------------------------------------------------
 *  Copyright (c) Microsoft Corporation. All rights reserved.
 *  Licensed under the MIT License. See License.txt in the project root for license information.
 *--------------------------------------------------------------------------------------------*/

/* Appbar */

.monaco-workbench .git-action.open-in-diff {
	background: url('Compare.svg') center center no-repeat;
}

.monaco-workbench .git-action.open-in-editor {
	background: url('OpenEditor.svg') center center no-repeat;
}

.vs-dark .monaco-workbench .git-action.open-in-diff {
	background: url('Compare_inverse.svg') center center no-repeat;
}

.vs-dark .monaco-workbench .git-action.open-in-editor {
	background: url('OpenEditor_inverse.svg') center center no-repeat;
}

/* Activity Bar */
.monaco-workbench > .activitybar .monaco-action-bar .action-label.git {
	/* Inline icon to prevent slow loading on startup (original: git-dark.svg) */
	background-image: url('');
}

/* Git viewlet label */
.git-viewlet-label > .badge-content, .git-viewlet-label-progress > .badge-content {
	background-color: #007ACC;
}

.git-viewlet-label-progress > .badge-content {
	background-color: #007ACC;
	background-image: url("");
	background-position: center center;
	background-repeat: no-repeat;
}

/* Git merge editor decorations */
.monaco-editor .git-merge-control-decoration {
	background-color: rgba(255, 139, 0, 0.3);
}
.monaco-editor.vs-dark .git-merge-control-decoration {
	background-color: rgba(235, 59, 0, 0.3);
}

/* Git dirty diff editor decorations */
.monaco-editor .git-dirty-modified-diff-glyph {
	border-left: 3px solid rgba(0, 122, 204, 0.6);
	margin-left: 5px;
}
.monaco-editor.vs-dark .git-dirty-modified-diff-glyph {
	border-left: 3px solid rgba(0, 188, 242, 0.6);
	margin-left: 5px;
}
.monaco-editor .git-dirty-added-diff-glyph {
	border-left: 3px solid rgba(45, 136, 62, 0.6);
	margin-left: 5px;
}
.monaco-editor.vs-dark .git-dirty-added-diff-glyph {
	border-left: 3px solid  rgba(127, 186, 0, 0.6);
	margin-left: 5px;
}
.monaco-editor .git-dirty-deleted-diff-glyph:after {
	content: '';
	position: absolute;
	bottom: -4px;
	margin-left: 5px;
	box-sizing: border-box;
	border-left: 4px solid rgba(185, 19, 26, 0.76);
	border-top: 4px solid transparent;
	border-bottom: 4px solid transparent;
	width: 4px;
	height: 0;
}

.monaco-shell .git-branch-dropdown-menu .action-label.git-action.checkout.HEAD {
	font-weight: bold;
}

.monaco-shell .git-branch-dropdown-menu .monaco-inputbox {
	font-size: 12px;
	width: 100%;
}

.monaco-shell .git-branch-dropdown-menu .monaco-inputbox > .wrapper > .input {
	background-color: transparent;
}

.monaco-shell .git-branch-dropdown-menu .monaco-inputbox > .wrapper > .input {
	padding: 0.8em 1em;
}

/* Quick Open */

.monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.git {
	background-size: 100%;
}

.vs .monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.git {
	background-image: url('git.svg');
}

.vs-dark .monaco-workbench .quick-open-widget .quick-open-tree .quick-open-entry .quick-open-entry-icon.git {
	background-image: url('git-dark.svg');
}

/* Actions */

.monaco-shell .git-action.live-sync.icon {
	background: url('sync.svg') 7px center no-repeat;
}

.monaco-shell .git-action.live-sync.icon.loading {
	animation:			spin-forever 1.6s linear infinite;
}

@keyframes			spin-forever { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }

/* High Contrast Theming */
.hc-black .monaco-workbench > .activitybar .monaco-action-bar .action-label.git:before {
	content: url('git-dark.svg');
}

.hc-black .monaco-workbench > .activitybar .monaco-action-bar .badge.git-viewlet-label-progress .badge-content {
	background: none;
	width: 1px;
}

.hc-black .monaco-workbench > .activitybar .monaco-action-bar .badge.git-viewlet-label-progress .badge-content:before {
	content: url("");
	position: relative;
	top: 2px;
	left: -4px;
	display: block;
	height: 16px;
	width: 16px;
}

.hc-black .monaco-workbench .git-action {
	background: none;
}

.hc-black .monaco-workbench .action-item.disabled .git-action:before {
}

.hc-black .monaco-workbench .git-action.open-in-diff:before {
	content: url('Compare_inverse.svg');
	position: absolute;
	top: 12px;
	left: 8px;
	height: 16px;
	width: 16px;
}

.hc-black .monaco-workbench .git-action.open-in-editor:before {
	content: url('OpenEditor_inverse.svg');
	position: absolute;
	top: 12px;
	left: 8px;
	height: 16px;
	width: 16px;
}

/* Status bar */

.monaco-shell .git-statusbar-group > a {
	padding: 0 5px;
}

.monaco-shell .git-statusbar-group > a.disabled {
	opacity: 0.7;
}

.monaco-shell .git-statusbar-group > a.octicon {
	line-height: 22px;
	width: 16px;
	text-align: center;
}

.monaco-shell .git-statusbar-group .octicon {
	font-size: 14px;
}

.monaco-shell .git-statusbar-group > .git-statusbar-sync-item:not(.empty) > span.octicon {
	margin-right: 6px;
}

@keyframes spin {
	from { transform: rotate(0deg); }
	to { transform: rotate(1080deg); }
}

.monaco-shell .git-statusbar-group > .git-statusbar-sync-item.syncing > .octicon {
	animation: 2s ease-in-out infinite spin;
}

.monaco-shell .git-statusbar-group > .git-statusbar-sync-item.disabled > .ahead-behind,
.monaco-shell .git-statusbar-group > .git-statusbar-sync-item.busy > .ahead-behind {
	cursor: default;
}

.monaco-shell .git-statusbar-group > .git-statusbar-branch-item {
	background-image: url('../media/git-dark.svg');
	background-repeat: no-repeat;
	background-position: 4px 50%;
	background-size: 17px;
	cursor: default;
	padding: 0 5px 0 22px;
}

.monaco-shell .git-statusbar-group > a:not(.disabled):not(.busy) {
	cursor: pointer;
}

.monaco-shell .git-statusbar-group > .busy,
.monaco-shell .git-statusbar-group > .disabled, {
	opacity: 0.6;
	cursor: default;
}

.monaco-shell .git-statusbar-group > .git-statusbar-branch-item.headless {
	font-style: italic;
}